﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using AutomotivePricingModel.BodyStyles;
using AutomotivePricingModel.Brands;
using AutomotivePricingModel.Companies;
using AutomotivePricingModel.Countries;
using AutomotivePricingModel.Dealers;
using AutomotivePricingModel.DriveTrainTypes;
using AutomotivePricingModel.ProductionModels;
using AutomotivePricingModel.TransmissionTypes;
using AutomotivePricingModel.Vehicles;
using AutomotivePricingModel.ValueObjects.MissingValueOptions;
using AutomotivePricingModel.ValueObjects.YearlyFinancialAssessments;

namespace AutomotivePricingModel
{
    public class AutomotivePricingDatabaseContext : DbContext
    {
        public const string DefaultConnectionName = "AutomotivePricingModel.AutomotivePricingDatabaseContext";

        public AutomotivePricingDatabaseContext()
            : this(DefaultConnectionName)
        { }

        public AutomotivePricingDatabaseContext(string nameOrConnectionString)
            : base(nameOrConnectionString)
        { }

        // DDD Aggregates/Entities
        public DbSet<BodyStyle> BodyStyles { get; set; }
        public DbSet<Brand> Brands { get; set; }
        public DbSet<Company> Companies { get; set; }
        public DbSet<Country> Countries { get; set; }
        public DbSet<Dealer> Dealers { get; set; }
        public DbSet<DealerBrandRelation> DealerBrandRelations { get; set; }
        public DbSet<DealerVehicleRelation> DealerVehicleRelations { get; set; }
        public DbSet<DriveTrainType> DriveTrainTypes { get; set; }
        public DbSet<ProductionModel> ProductionModels { get; set; }
        public DbSet<TransmissionType> TransmissionTypes { get; set; }
        public DbSet<Vehicle> Vehicles { get; set; }

        // DDD Value Objects
        public DbSet<MissingValueOption> MissingValueOptions { get; set; }
        public DbSet<YearlyFinancialAssessment> YearlyFinancialAssessments { get; set; }
        public DbSet<YearValueObservation> YearValueObservations { get; set; }
    }
}